import request from '@/utils/request'

export const getParkRecordPageApi = async (params: any) => {
    return request.get('/park-record', { params })
}

export const getParkRecordOptionListApi = async () => {
    return request.get('/park-record/option-list')
}

export const getLastParkRecordApi = async (params) => {
    return request.get(`/park-record/last-park-record`, {
        params,
    })
}

export const getParkRecordByIdApi = async (id: string) => {
    return request.get(`/park-record/${id}`)
}

export const createParkRecordApi = async (data: any) => {
    return request.post('/park-record', data)
}

export const updateParkRecordApi = async (id: any, data: any) => {
    return request.put(`/park-record/${id}`, data)
}

export const deleteParkRecordApi = async (id: string) => {
    return request.delete(`/park-record/${id}`)
}
